<script type='text/javascript'>
          	$(function() {
		                   $('#from').datepicker({
			                   changeMonth: true,
			                   changeYear: true,
                               dateFormat: 'yy-mm-dd'
		                   });
	                   });
	                   $(function() {
                               $('#to').datepicker({
                                   changeMonth: true,
                                   changeYear: true,
                                   dateFormat: 'yy-mm-dd'
                               });
                           });
</script>	
<div class='center_form'>
    <div class="center_form_right">
        <div class='center_form_btn_div' onclick='javascript:Common.submit();'>
            <div class='center_form_btn_pic'>
                <img src='<?php echo HttpUtil::baseUrl();?>/images/save.gif'/>
            </div><div class='center_form_btn_text'><?php echo $this->translate("saveBtn"); ?></div>
        </div>
        <div class='center_form_btn_div' onclick='javascript:Common.gotoUrl("<?php echo HttpUtil::baseUrl();?>/promotion/promotion/saleprice");'>
            <div class='center_form_btn_pic'>
                <img src='<?php echo HttpUtil::baseUrl();?>/images/cancel.gif'/>
            </div><div class='center_form_btn_text'><?php echo $this->translate("cancelBtn"); ?></div>
        </div>
    </div>
</div>
<div class="clear"></div>
<div class="centerbig_form">
      <div class="center_top"><span class="center_top_title"><?php echo $this->translate("addSalePricePromotion"); ?></span></div>
      <div class="right_form_content">
            <div class="centerbig_right">
               <div class="form_content">
                    <form action="<?php echo $this->form->getAction(); ?>" method="post">
                        <?php ZendFormUtil::renderElement($this->form->action); ?>
                        <div class="form_line_div">
                            <div class="form_element_label"><?php echo $this->form->amount->getlabel() ?></div>
                            <div class="form_element">
                                <input type="text" value="" id="amount" name="amount" onblur=""/>
                                <div class="form_element_error" id="amount_error"><?php echo ZendFormUtil::renderErrorMessage($this->form->amount);?></div>
                            </div>
                        </div>
                        <div class="clear"></div>
                        <div class="form_line_div">
                            <div class="form_element_label"><?php echo $this->form->from->getlabel() ?></div>
                            <div class="form_element">
                                <input type="text" value="" id="from" name="from" onblur=""/>
                                <div class="form_element_error" id="from_error"><?php echo ZendFormUtil::renderErrorMessage($this->form->from);?></div>
                            </div>
                        </div>
                        <div class="clear"></div>
                        <div class="form_line_div">
                            <div class="form_element_label"><?php echo $this->form->to->getlabel() ?></div>
                            <div class="form_element">
                                <input type="text" value="" id="to" name="to" onblur=""/>
                                <div class="form_element_error" id="to_error"><?php echo ZendFormUtil::renderErrorMessage($this->form->to);?></div>
                            </div>
                        </div>
                        <div class="clear"></div>
                        <div class="form_line_div">
                            <div class="form_element_label"><?php echo $this->translate("applyTo"); ?></div>
                            <div class="form_element">
                            <input type="button" value="<?php echo $this->translate("selectProduct"); ?>"  onclick="javascript:Promotion.openSearchDialog('<?php echo HttpUtil::baseUrl();?>');" />
                            <input type="button" value="<?php echo $this->translate("removeProduct"); ?>"  onclick="javascript:Promotion.removeItems();" />
                            <table cellspacing="0" cellpadding="0" class="form_element_table">
                                    <thead>
                                        <tr>
                                            <td class="dbgrid_th_ckb"><input type="checkbox" id="itemAllCkb" onclick="javascript:Promotion.checkAll();" style="margin-right:0px;"/></td>
                                            <td class="dbgrid_th2"><span><?php echo $this->translate("productTitle"); ?></span></td>
                                            <td class="dbgrid_th2"><span><?php echo $this->translate("itemSku"); ?></span></td>
                                            <td class="dbgrid_th2"><span><?php echo $this->translate("upc"); ?></span></td>
                                            <td class="dbgrid_th2"><span><?php echo $this->translate("attribute"); ?></span></td>
                                       </tr>
                                    </thead>
                                    <tbody id="productItemBody">
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="clear"></div>                        
                    </form>
               </div>
            </div>
      </div>
      <div class='clear'></div>
</div>
<div class='clear'></div>
<div id="searchDialog"></div>